﻿using System;
using System.Collections.Generic;
using UnityEngine;

// Token: 0x020005B1 RID: 1457
public class LoadedAssetBundle
{
    public static int index;

    public static Dictionary<string, List<string>> allInfo = new Dictionary<string, List<string>>();

    public static void Output()
    {
        foreach (var info in allInfo)
        {
            var sb = new System.Text.StringBuilder();
            sb.AppendLine("bundle:" + info.Key);
            foreach (var assetInfo in info.Value)
            {
                sb.AppendLine(assetInfo);
            }
            UnityEngine.Debug.Log(sb);
        }
    }



    // Token: 0x0600225E RID: 8798 RVA: 0x0013717C File Offset: 0x0013537C
    public LoadedAssetBundle(string assetBundleName, AssetBundle assetBundle)
    {
        this.m_AssetBundle = assetBundle;
        this.m_ReferencedCount = 1;
        var list = new List<string>();
        foreach (var name in assetBundle.AllAssetNames())
        {
            var asset = assetBundle.LoadAsset(name);
            list.Add("type:" + asset.GetType() + " name:" + name);
            if (asset.GetType() == typeof(GameObject) && asset.name != "p_dummy")
            {
               /* var go = GameObject.Instantiate(asset) as GameObject;
                go.transform.position = Vector3.left * (index % 5) + Vector3.down * (index / 5);
                index++;*/
            }
        }
        allInfo[assetBundleName] = list;

    }



    // Token: 0x04002B52 RID: 11090
    public AssetBundle m_AssetBundle;

    // Token: 0x04002B53 RID: 11091
    public int m_ReferencedCount;
}
